package com.marvels.financial.pay.hlbpay.dto;

/**
 * 合利宝底层接口返回信息
 * @author wujunfeng
 *
 */
public class HlbReturnDTO {

	/**
	 * 状态 0成功  -1失败  1处理中
	 */
	private String code;
	
	/**
	 * 提示信息
	 */
	private String msg;
	
	/**
	 * 第三方code
	 */
	private String thirdCode;
	
	/**
	 * 数据
	 */
	private Object data;

	
	public HlbReturnDTO(String code, String msg, String thirdCode, Object data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	public static HlbReturnDTO success(String thirdCode, Object data){
		return new HlbReturnDTO("0", "成功", thirdCode, data);
	}
	
	public static HlbReturnDTO fail(String msg, String thirdCode, Object data){
		return new HlbReturnDTO("-1", msg, thirdCode, data);
	}
	
	public static HlbReturnDTO fail(String msg, Object data){
		return new HlbReturnDTO("-1", msg, null, data);
	}
	
	public static HlbReturnDTO processing(String msg, String thirdCode, Object data){
		return new HlbReturnDTO("1", msg, thirdCode, data);
	}
	
	public static HlbReturnDTO processing(String msg, Object data){
		return new HlbReturnDTO("1", msg, null, data);
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}

	public String getThirdCode() {
		return thirdCode;
	}

	public void setThirdCode(String thirdCode) {
		this.thirdCode = thirdCode;
	}
	
}
